# Python提供了Enum类来实现这个功能：
from enum import Enum, unique


@unique  # 装饰器可以帮助我们检查保证没有重复值。
class Weekday(Enum):
    Sun = 0  # Sun的value被设定为0
    Mon = 1
    Tue = 2
    Wed = 3
    Thu = 4
    Fri = 5
    Sat = 6


# 打印数据
print(Weekday.Sun)
print(Weekday.Sun.value)
